package com.tohours.aia.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name = "aia_gift_log", schema = "dbo", catalog = "aiawebsite")
public class GiftLog implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String customerId;
	private Customer customer;
	private Long giftCode;
	private Boolean exchangeFlag;
	private String exchangeCode;
	private Date insertTime;
	private Date updateTime;


	@Id
	@Column(name="id")
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid", strategy = "uuid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}

	@Column(name="customer_id")
	public String getCustomerId() {
		return customerId;
	}
	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", insertable = false, updatable = false)
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	@Column(name="gift_code")
	public Long getGiftCode() {
		return giftCode;
	}
	public void setGiftCode(Long giftCode) {
		this.giftCode = giftCode;
	}
	@Column(name="exchange_flag")
	public Boolean getExchangeFlag() {
		return exchangeFlag;
	}
	public void setExchangeFlag(Boolean exchangeFlag) {
		this.exchangeFlag = exchangeFlag;
	}

	@Column(name="insert_time")
	public Date getInsertTime() {
		return insertTime;
	}
	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name="update_time")
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Column(name="exchange_code")
	public String getExchangeCode() {
		return exchangeCode;
	}
	public void setExchangeCode(String exchangeCode) {
		this.exchangeCode = exchangeCode;
	}
	
	
}
